package com.yihuan.mapper;

import com.yihuan.entity.CollectionCompEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/5/4 9:16
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Mapper
public interface CollectionCompMapper {
    /**
     * 新增公司收藏信息
     *
     * @param collectionCompEntity
     * @return
     */
    int insertCollectionCompByCollectionCompData(CollectionCompEntity collectionCompEntity);
    
    /**
     * 查询公司收藏信息是否已存在过
     *
     * @param collectionCompEntity
     * @return
     */
    List<CollectionCompEntity> findCollectionCompByCollectionCompByID(CollectionCompEntity collectionCompEntity);
    
    /**
     * 查询用户收藏
     *
     * @param collectionCompEntity
     * @return
     */
    List<CollectionCompEntity> findCollectionCompByCollectionComp(CollectionCompEntity collectionCompEntity);
    
    /**
     * 取消收藏
     *
     * @param collectionCompEntity
     * @return
     */
    int updateCollectionCompByCollectionComp(CollectionCompEntity collectionCompEntity);
}
